<div id="deartment" class="f-r">
  <template v-if="!multiple">
    <div class="deartment_tit" :class="{'not_click5': !canEidt}" v-if="deartmentName!==''">{{deartmentName}}
      <span class="close" aria-label="Close" @click="delDeart"><span>×</span></span>
    </div>
    <div v-if="canEidt"><a class="select-dept-add" data-toggle="popover" title="添加部门" href="javascript:;"
        @click="openDialog"><i class="eliconfont icon-plus"></i></a></div>
  </template>
  <el-button v-else type="primary" @click="openDialog">添加部门</el-button>


  <!-- 移动到弹窗 -->
  <el-dialog title="部门选择" :visible.sync="dialogVisible" :append-to-body="true" :modal="false" width="420px"
    :before-close="handleClose">
    <div class="f-r">
      <div>
        <el-input v-model="keyWord" placeholder="请输入部门名称模糊查询"></el-input>
      </div>
      <div class="btn-group m-l20" role="group">
        <button type="submit" class="btn btn-primary" title="搜索" data-lang-attr="title#search"><i
            class="eliconfont icon-search" @click="getDeart()"></i></button>
        <button type="reset" title="清除搜索" @click="reset()" id="project-list-ctt-clear-condition" class="btn btn-default"
          data-lang-attr="title#reset_search"><i class="eliconfont icon-refresh"></i></button>
      </div>
    </div>
    <div class="win-tree m-t20">
      <el-tree ref="tree" :data="searchDeartData" :props="props" node-key="id" :load="loadNode" lazy show-checkbox
        @check-change="changDeart" :check-strictly="!multiple">
      </el-tree>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button type="primary" @click="saveDialog">确 定</el-button>
      <el-button @click="closeDialog">取 消</el-button>
    </span>
  </el-dialog>
</div>